package com.towexin.application.activiti.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import com.towexin.application.activiti.domain.ActivitiesForm;
import com.towexin.application.activiti.domain.ApproveInfo;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

public interface ActivitiesService extends IService<ActivitiesForm> {
    List<JSONObject> processDefinitionList();

    boolean inputProcessDefinition(MultipartFile file, String name);
    boolean xmlProcessDefinition(String bpmnId, String xml, String name);

    boolean deleteProcessDefinition(String id);

    boolean startActivities(String instanceId, String jsonString);

    boolean deleteProcessInstance(String instanceId);

    JSONObject getXml(String id);

    List<JSONObject> getMyTasks();

    List<JSONObject> getMyHistoricProcess();

    boolean doTask(String id, boolean state);

    void getFlowChart(HttpServletResponse response, String processDefinitionId,String resType);

    void showImg(String id, HttpServletResponse response);

    List<ApproveInfo> getTasks(String processInstanceId);

}
